package com.ddwl.data.controller;

import com.ddwl.common.annotation.Auth;
import com.ddwl.common.constant.BaseEnum;
import com.ddwl.common.controller.BaseController;
import com.ddwl.data.service.BankService;
import com.ddwl.schema.vo.base.RestVo;
import com.ddwl.schema.vo.data.BankVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author hemiaojun
 * @Date 2021/6/18 11:48
 */
@Api(tags = "银行信息接口类")
@RequestMapping("/bank")
@RestController
public class BankController extends BaseController {


    @Resource
    private BankService bankService;

    @GetMapping("/list")
    @ApiOperation("银行选择列表")
    @Auth(product = {BaseEnum.ProductEnum.FENXIAO, BaseEnum.ProductEnum.MALL})
    public RestVo<List<BankVo>> bankList(){
        return RestVo.ok(bankService.list());
    }



}
